## Loading required package: gplots
##
## Attaching package: 'gplots'
## The following object is masked from 'package:stats':
##
## lowess
## Loading required package: RColorBrewer
## Loading required package: data.table
## Loading required package: mclust
## Package 'mclust' version 5.1
## Type 'citation("mclust")' for citing this R package in publications.
## Loading required package: ggplot2
## Loading required package: gridExtra
## Warning: package 'gridExtra' was built under R version 3.2.4
## Loading required package: devtools
## Loading required package: grid
## Loading required package: cluster
##
Read 42.8% of 23368 rows
Read 85.6% of 23368 rows
Read 23368 rows and 1120 (of 1120) columns from 0.361 GB file in 00:00:04
library(ggplot2)
# Remove genes with low variation (filtering)
icbp_f <-icbp[apply(icbp[,1:55]==0,1,mean) < 0.85,]
# Perfrom PCA Analysis
pca_mat_icbp <- prcomp(t(icbp_f), center=T,scale=T)
rownames(pca_mat_icbp$x)[1:7]<-gsub("X","",rownames(pca_mat_icbp$x)[1:7])
# Plot ICBP PCA Results
plot(pca_mat_icbp,main="ICBP")
#correlate the PCAs with GFRN pathway predictions from ASSIGN
icbp_pca_sig_cors=cor(pca_mat_icbp$x,single_pathway_best_icbp,method="spearman")
heatmap.2(as.matrix(icbp_pca_sig_cors[1:5,1:7]),col=my_palette,margins = c(9,7), trace= "none", main="ICBP PC/Signature Cors")
## [1] 23368 1119
## [1] 21307 1119
library(gplots)
#pdf("~/Dropbox/Multipathway_profiling_paper/Figures/TCGA_PCA_PC5_nokey.pdf ")
pca1_5=pca_mat$x[,1:5]
pca_pathway_cors= cor(pca1_5, single_pathway_best_tcga, method = "spearman")
# Heatmap with signature/PC correlations
heatmap.2(as.matrix(pca_pathway_cors),col=my_palette,main="Cor between PCs 1-5 and signatures in TCGA \n BRCA samples", trace = "none", key=T)
## [1] "733 names have been changed"
## [1] "analyzing BAX"
## [1] "BAX data available"
## [1] "analyzing BAK1"
## [1] "analyzing BID"
## [1] "BID data available"
## [1] "analyzing BIM"
## [1] "BIM data available"
## [1] "analyzing BAD"
## [1] "BAD data available"
## [1] "analyzing BIK"
## [1] "analyzing NOXA"
## [1] "analyzing HRK"
## [1] "analyzing PUMA"
## [1] "analyzing BMF"
## [1] "analyzing BCL2"
## [1] "BCL2 data available"
## [1] "analyzing BCLXL"
## [1] "BCLXL data available"
## [1] "analyzing BCLW"
## [1] "analyzing MCL1"
## [1] "analyzing BFL1"
## [1] "517 names have been changed"
## [1] -0.8238542
This analysis was run on Tue Jun 21 00:02:43 2016